package com.future.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.future.domain.Electric;
import com.future.domain.Notice;
import com.future.dto.ElectricDto;
import com.future.dto.MsgDto;
import com.future.service.ElectricService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: 何晔
 * @time: 2022/6/27 15:14
 */
@RestController
@RequestMapping("Electric")
public class ElectricController {


    @Autowired
    private ElectricService electricService;







     //分页查询
    @RequestMapping("select")
    public PageInfo<ElectricDto> select(ElectricDto electricDto){


        PageHelper.startPage(electricDto.getCurrent(),electricDto.getSize());
        List   list    =   this.electricService.selectElectric();

        PageInfo pageInfo=new PageInfo(list);


        return pageInfo;
    }

}
